Prior optical detectors have used a plurality of semiconductor photodetectors, each with a different bandgap energy. As an incoming optical signal at a given energy level is incident on the photodetectors, a photocurrent is generated in those detectors that have a bandgap energy level less than the energy level of the optical signal. By observing which photodetectors do and do not produce a photocurrent, the energy level and thus the wavelength of the optical signal is known. This technique requires complicated and expensive epitaxial growth procedures to vary the bandgap energy level of each photodetector. Such fabrication techniques are complicated and expensive.